package com.my.package1;
import java.util.Scanner;
public class homework4 {
    public static void main(String[] args) {
        int sum = 0;
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i <= 5; i++) {
            System.out.println("Please enter the results:");
            int n = sc.nextInt();
            if (n < 0 || n > 100) {
                System.out.println("You entered the wrong grade");
                break;
            } else {
                sum += n;
            }
            System.out.println("sum:" + sum);
        }
    }
}